package com.spa.modules.system.entity;

import java.io.Serializable;
import java.util.Date;

import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.spa.common.utils.LongToStringUtil;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 描述: 用户
 * author: P0081447
 * date: 2022-06-27 20:27:48
 */
@TableName("spa_user")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="spa_user对象", description="用户")
public class SpaUser implements Serializable {
    private static final long serialVersionUID = 1L;

    // 唯一标识
    @ApiModelProperty(value = "唯一标识")
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = LongToStringUtil.class)
    private Long id;

    // 姓名
    @ApiModelProperty(value = "姓名")
	@Excel(name = "姓名", width = 15)
    private String realName;

    // 用户名
    @ApiModelProperty(value = "用户名")
	@Excel(name = "用户名", width = 15)
    private String usrName;

    // 密码
    @ApiModelProperty(value = "密码")
	@Excel(name = "密码", width = 15)
    private String usrPwd;

    // 邮箱
    @ApiModelProperty(value = "邮箱")
	@Excel(name = "邮箱", width = 15)
    private String usrEmail;

    // 手机
    @ApiModelProperty(value = "手机")
	@Excel(name = "手机", width = 15)
    private String mobile;

    // 角色
    @ApiModelProperty(value = "角色")
    @JsonSerialize(using = LongToStringUtil.class)
	@Excel(name = "角色", width = 15)
    private Long roleId;

    // 创建时间
    @ApiModelProperty(value = "创建时间")
	@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    // 更新时间
    @ApiModelProperty(value = "更新时间")
	@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

}
